{extend name="./static/page/admin_tpl.html" /}

{block name="header_title"}大话软件后台{/block}
{block name="page_css"}
<link href="{$__TEMPLETE__}/css/admin/message/messageDetail.css" rel="stylesheet">
{/block}
{block name="content"}
<div class="col-md-12 right-section">
    <!--内容区域-->
    <h3><i class="icon iconfont">发布消息修改
        <div class="operation-div">
            <a class="btn btn-default" href="javascript:window.history.go(-1);">返回</a>
        </div>
    </h3>
    <div class="inner-section row">
        <div id="content">
            <form action="#" method="post" id="myForm"  enctype="multipart/form-data">
                <input type="hidden" name="oid" class="oid" value="{$message.id}">
                <table class="table table-striped table-hover table-bordered table-base">
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>发布消息分类</label></td>
                        <td class="td2">
                            <select class="select-normal" id="label_id" name="label_id">
                                {volist name="labels" id="label"}

                                <option value="{$label.id}" {if $label.id == $message.label_id}selected{/if} >{$label.name}</option>

                                {/volist}
                            </select>
                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>发布者姓名</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="nick_name" name="nick_name" value="{$message.nick_name}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>联系电话</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="phone" name="phone" value="{$message.phone}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>微信号码</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="wx_number" name="wx_number" value="{$message.wx_number}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>发布消息内容</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="text_content" name="text_content" value="{$message.text_content}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>浏览数</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="check_num" name="check_num" value="{$message.check_num}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>留言数</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="message_num" name="message_num" value="{$message.message_num}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>点赞数</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="like_num" name="like_num" value="{$message.like_num}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td class="td1"><label for="imgurl_1"><span class="must-tag">&nbsp;&nbsp;</span>内容图片更新</label></td>
                        <td class="td2">
                            <input type="hidden" name="prevurl_1" value="{$__LOD__.$message_imgs[0]['thumb']}">

                            <input class="imgurl form-control"  accept="image/*" title="支持jpg、jpeg、gif、png格式，文件小于5M"   tabindex="3" type="file" id="imgurl_1"name="imgurl_1" size="3">
                            <img src="{$__LOD__.$message_imgs[0]['thumb']}" style="height: 40px;"  title="缩略图" >
                            <!---是否重新上传图片标识 0未更新，1更新图片-->
                            <input type="hidden" id="imgFlag_1" name="imgFlag_1" value="0">
                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label for="imgurl_2"><span class="must-tag">&nbsp;&nbsp;</span>内容图片更新</label></td>
                        <td class="td2">
                            <input type="hidden" name="prevurl_2" value="{$__LOD__.$message_imgs[1]['thumb']}">

                            <input class="imgurl form-control"  accept="image/*" title="支持jpg、jpeg、gif、png格式，文件小于5M"   tabindex="3" type="file" id="imgurl_2"name="imgurl_2" size="3">
                            <img src="{$__LOD__.$message_imgs[1]['thumb']}" style="height: 40px;"  title="缩略图" >
                            <!---是否重新上传图片标识 0未更新，1更新图片-->
                            <input type="hidden" id="imgFlag_2" name="imgFlag_2" value="0">
                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label for="imgurl_3"><span class="must-tag">&nbsp;&nbsp;</span>内容图片更新</label></td>
                        <td class="td2">
                            <input type="hidden" name="prevurl_3" value="{$__LOD__.$message_imgs[2]['thumb']}">

                            <input class="imgurl form-control"  accept="image/*" title="支持jpg、jpeg、gif、png格式，文件小于5M"   tabindex="3" type="file" id="imgurl_3"name="imgurl_3" size="3">
                            <img src="{$__LOD__.$message_imgs[2]['thumb']}" style="height: 40px;"  title="缩略图" >
                            <!---是否重新上传图片标识 0未更新，1更新图片-->
                            <input type="hidden" id="imgFlag_3" name="imgFlag_3" value="0">
                        </td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>图片</label></td>
                        <td class="td2">
                            {foreach $message_imgs as $key=>$img }
                            <img src="{$__LOD__.$img.thumb}"/>
                            {/foreach}

                        </td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label for="where"><span class="must-tag">*</span>点击选取详细位置</label></td>
                        <td class="td2">
                            <input type="hidden" name='longitude' id='longitude' value="{$message.longitude}">
                            <input type="hidden" name='latitude' id='latitude' value="{$message.latitude}">
                            <div class="where" id="allmap" style="height:480px; width:480px;">
                            </div>
                            <div class="map-search-row row">
                                <input class="keyword" type="type" placeholder="关键词查找">
                                <a class="search-keyword">搜索</a>
                            </div>
                        </td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>联系地址</label></td>
                        <td class="td2">
                            <input type="text" class="form-control" id="address_text" name="address_text" value="{$message.address_text}" placeholder="修改姓名">

                        </td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td></td>
                        <td>
                            <a href="javascript:;" class="btn btn-success save">提交</a>
                            <a href="javascript:;" class="btn btn-default back">返回</a>
                        </td>
                        <td></td>
                    </tr>
                </table>
            </form>

        </div>
    </div>
</div>
{/block}

{block name="page_js"}
<script src="{$__TEMPLETE__}/js/admin/message/messageDetail.js"></script>
<!-- jsfiles -->
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=E8585e29607347015477b67178b530ab"></script>
{/block}